<?php
if (! defined ( 'BASEPATH' ))
	exit ( 'No direct script access allowed' );

class Member extends CI_Controller {
	var $eData = '';
	function __construct() {
		parent::__construct ();
		$this->thor->loginstate ();
	}
	
	function index() {
		$ePage = ( int ) $this->input->get ('page' );
	//	$this->db->select('member.*');
	//	$this->db->from('member');
	//	$this->db->join('codevalue','member.pwdquestion=codevalue.code','left');
	//	$this->db->where("codevalue.name",'qstTip');
		$this->db->limit(20,$ePage);
		$memberList = $this->db->get('member')->result_array ();
		$eData ['memberList'] = $memberList;
		
		$eData ['memberCount'] = $this->db->count_all_results ( 'member' );
		
		$this->load->library ( 'pagination' );
		$eConfig ['per_page'] = 20;
		$eConfig ['num_links'] = 10;
		$eConfig ['base_url'] = site_url ( 'mang/member?1=1' );
		$eConfig ['total_rows'] = $eData ['memberCount'];
	//	$eConfig ['first_link'] = false;
	//	$eConfig ['last_link'] = false;
	//	$eConfig ['next_link'] = '下一页';
	//	$eConfig ['next_tag_open'] = '<div class="def_btn_s3">';
	//	$eConfig ['next_tag_close'] = '</div>';
	//	$eConfig ['prev_link'] = '上一页';
	//	$eConfig ['prev_tag_open'] = '<div class="def_btn_s3 mr5">';
	//	$eConfig ['prev_tag_close'] = '</div>';
	//	$eConfig ['display_pages'] = FALSE; //不显示数字链接
		$this->pagination->initialize ( $eConfig );
		
		
		$this->load->view ( 'mang/member',$eData);
	}
	
	

}